
class A1:
    pass

class A2:
    pass

class A(A1,A2):
    pass

class B2:
    pass

class B1(B2):
    pass
    def __str__(self):
        return "B1"

class B(B1):
    pass
    def __str__(self):
        return "B"

class C:
    pass

class D(A,B,C):
    pass

d=D()

print(d)
print(D.mro())